//package com.xiguaji.tiktok.task.aweme.repository;
//
//import com.gugee.tiktok.common.model.dto.BloggerAwemeExtendDto;
//import com.gugee.tiktok.common.model.dto.BloggerRecordAwemeExtendDto;
//import com.gugee.tiktok.common.model.dto.SimpleAweme;
//import com.gugee.tiktok.common.model.mysql.Aweme;
//import com.gugee.tiktok.data.common.msg.BloggerMessage;
//import com.gugee.tiktok.data.common.msg.CommentMessage;
//import com.gugee.tiktok.data.common.msg.KeywordMessage;
//import com.gugee.tiktok.data.common.msg.MusicMessage;
//import org.springframework.data.jdbc.repository.query.Query;
//import org.springframework.data.repository.CrudRepository;
//import org.springframework.stereotype.Repository;
//import java.util.List;
//import java.util.Optional;
//@Repository
//public interface AwemeRepository extends CrudRepository<Aweme, Long>, AwemeExtRepository {
//
//
//
//
//    @Query("SELECT id,o_uid,o_aweme_id,syn_comments,analysis_comments,o_comment_count,o_create_time FROM aweme" +
//            " where o_uid = :uid And datecode >:minTime  And syn_comments <:maxComments And o_comment_count>(syn_comments + :stepComments)")
//    List<CommentMessage> findCommentMessagesByUidAndRecentTimes(long uid,int minTime,int maxComments,int stepComments);
//
//    @Query("SELECT id,o_uid,o_aweme_id,syn_comments,analysis_comments,o_comment_count,o_create_time FROM aweme " +
//            " where datecode >:minTime AND aweme_type = :type  And syn_comments <:maxComments And o_comment_count>(syn_comments + :stepComments) " +
//            " order by score desc LIMIT  :start,:records ")
//    List<CommentMessage> getCommentsRankingOrderByScore(int minTime,String type,int maxComments,int stepComments,long start, long records);
//
//    @Query("SELECT id,o_aweme_id,o_create_time FROM aweme" +
//            " where o_uid = :uid And o_create_time >:minTime  And analysis_comments < syn_comments")
//    List<SimpleAweme> findKeywordMessagesByUidAndRecentTimes(long uid, Long minTime);
//    @Query("SELECT uid,region,blogger_type,ranking FROM (SELECT o_uid as uid,o_region as region,blogger_type,'true' as ranking FROM aweme " +
//            " where datecode >:miniTime AND aweme_type = :type "+
//            " AND o_region != 'IN' " +
//            " ORDER BY score DESC " +
//            "LIMIT 0,:top ) a group by uid,region,blogger_type,ranking")
//    List<BloggerMessage> findBloggerByTypeSortDescFromAweme(int miniTime, String type, long top);
//}
